# Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Sébastien Luttringer <seblu@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Francois Boulogne <fboulogne at april dot org>

pkgname=glances
pkgver=3.4.0.3
pkgrel=1
pkgdesc='CLI curses-based monitoring tool'
arch=('any')
url='https://nicolargo.github.io/glances/'
license=('LGPL')
makedepends=('python-setuptools')
depends=('python' 'python-psutil' 'python-future' 'python-defusedxml' 'python-ujson')
optdepends=('hddtemp: HDD temperature monitoring support'
            'python-bottle: web server support'
            'python-docker: for the Docker monitoring support'
            'python-matplotlib: for graphical/chart support'
            'python-netifaces: for the IP plugin'
            'python-zeroconf: for the autodiscover mode'
            'python-pystache: templating engine'
            'python-prometheus_client: for the Prometheus export module')
source=("${pkgname}-${pkgver}-${pkgrel}.tar.gz::https://github.com/nicolargo/glances/archive/v${pkgver}.tar.gz"
        'glances.service')
sha512sums=('f4960d7d23b52e249069b41fd9b20a4d6f56006a6998b1bfd341ef00628fa92c14503885ebbea6adeee6f926a6c6fb440c288e2c772d4536b2c2b49e4124a7a0'
            '49f0d185a37a5c5837e5beb463770c943ede40b2f1b8405e338129e897e97d9fc58373a8586fabc506266e6343cfea3c91b9787ac6832cc97a1ab63d6ad058d4')
b2sums=('5437d3daefd4d36e9b84481543cf8189964006d566a77506099bfe7748d37409d5fb2a3a8eb52c8eeef0efa469c2ca92db7a37a44625969aec822d1adf46dbb3'
        'ecc44f8c06b1e8624cec92e41422a65d11e024b9fc23bae09b4e52fbedeb172a5034e5b612bbff7ba93d45189fb25eda0d54bc47b22b7f3f0acba984391e4017')

package() {
  cd "glances-${pkgver}"
  python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
  install -Dm644 "${srcdir}"/glances.service \
    "${pkgdir}"/usr/lib/systemd/system/glances.service
}

# vim:set ts=2 sw=2 et:
